<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<title>修改密码</title>

<!-- Bootstrap -->
<link href="#(HOSTRESOUCE_PATH)/css/bootstrap.min.css" rel="stylesheet">
<link href="#(HOSTRESOUCE_PATH)/css/mui.min.css" rel="stylesheet">


<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
      <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
      <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
    <![endif]-->
<script type="text/javascript">
	$(function(){
		var errMsg = "#(errMsg??0)";
		if(errMsg != 0){
			mui.alert("提醒",errMsg,"确认");
		}
	});
	
	function check(){
		var password = $('input[name="newPassword"]').val();
		var password2 = $('input[name="newPassword2"]').val();		
		if(password != password2){
			mui.alert("提醒","两次输入的密码不一致","确认");
			return false;
		}else{
			password = hex_sha1($('input[name="newPassword"]').val());
		    $('input[name="newPassword"]').val(password);
			password2 = hex_sha1($('input[name="newPassword2"]').val());
		    $('input[name="newPassword2"]').val(password2);
			var oldPassword = hex_sha1($('input[name="oldPassword"]').val());
		    $('input[name="oldPassword"]').val(oldPassword);
		    return true;
		}	
	}
</script>
</head>
<style>
#loginPanel {
	margin-top: 40px;
}
</style>
<body>
	<div class="mui-card">
		<form class="mui-input-group" action="modifyPassword">
		    <div class="mui-input-row">
		        <label>原密码</label>
		    <input type="password" class="mui-input-clear" name="oldPassword" placeholder="请输入原密码">
		    </div>
		    <div class="mui-input-row">
		        <label>新密码</label>
		        <input type="password" class="mui-input-password" name="newPassword" placeholder="请输入新密码">
		    </div>
		    <div class="mui-input-row">
		        <label>确认密码</label>
		        <input type="password" class="mui-input-password" name="newPassword2" placeholder="请再次输入密码">
		    </div>
		    <div class="mui-button-row">
		        <button type="submit" class="mui-btn mui-btn-primary" onclick="check();">提交</button>
		    </div>
		</form>
	</div>
	<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
	<script src="#(HOSTRESOUCE_PATH)/js/jquery.min.js"></script>
	<!-- Include all compiled plugins (below), or include individual files as needed -->
	<script src="#(HOSTRESOUCE_PATH)/js/bootstrap.min.js"></script>
	<script src="#(HOSTRESOUCE_PATH)/js/mui.min.js"></script>
	<script src="#(HOSTRESOUCE_PATH)/inc/lib/sha1.js"></script>
</body>
</html>